package org.radsimplified.genapp;

import java.util.Properties;
import java.io.FileInputStream;

import org.radsimplified.genapp.metadata.Loader;

public class GenApp 
{
	public static Properties properties = new Properties();

	public static void main(String[] args) throws Exception
    {
		String propertyFilePath = args.length == 0 ? "/opt/radsimplified/genapp.properties" : args[0];
		properties.load(new FileInputStream(propertyFilePath));

    	Loader.load(properties.getProperty("metadata"));
    	
    	// boolean newApp = properties.getProperty("new").toLowerCase().equals("true");
    	AppGenerator.generateApp(); // true = new, false = old
    }
    
}
